package com.yjy.xml.v2;

import javax.xml.bind.annotation.*;

/**
 * 顶部元素：公共字段部分
 */
@XmlRootElement(name = "ATSYH")
@XmlAccessorType(XmlAccessType.FIELD)
public class FinGardTransaction {

    @XmlElement(name = "TransReq", nillable = true)
    private TransReq transReq;

    public TransReq getTransReq() {
        return transReq;
    }

    public void setTransReq(TransReq transReq) {
        this.transReq = transReq;
    }

    @XmlRootElement(name = "TransReq")
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class TransReq<T> {

        public TransReq() {
            this.transType = "7506";
            this.transSeqID = "transSeqID123";
            this.transTime = "2021-05-20 10:30:30";
        }

        @XmlElement(name = "BankCode", nillable = true)
        private String payBankCode; // 银行编码

        @XmlElement(name = "TransType", nillable = true)
        private String transType; // 指令类型

        @XmlElement(name = "TransSeqID", nillable = true)
        private String transSeqID; // 请求唯一流水号

        @XmlElement(name = "TransTime", nillable = true)
        private String transTime; // 请求日期时间

        @XmlAnyElement(lax = true)
        private T transParam;

        public String getPayBankCode() {
            return payBankCode;
        }

        public void setPayBankCode(String payBankCode) {
            this.payBankCode = payBankCode;
        }

        public String getTransType() {
            return transType;
        }

        public void setTransType(String transType) {
            this.transType = transType;
        }

        public String getTransSeqID() {
            return transSeqID;
        }

        public void setTransSeqID(String transSeqID) {
            this.transSeqID = transSeqID;
        }

        public String getTransTime() {
            return transTime;
        }

        public void setTransTime(String transTime) {
            this.transTime = transTime;
        }

        public T getTransParam() {
            return transParam;
        }

        public void setTransParam(T transParam) {
            this.transParam = transParam;
        }
    }
}